home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / 2FJGS4 (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  883 b   |  21 lines

  1. package com.sun.java.swing;
  2.  
  3. import com.sun.java.swing.text.JTextComponent;
  4. import com.sun.java.swing.text.TextAction;
  5. import java.awt.event.ActionEvent;
  6.  
  7. class JTextField$NotifyAction extends TextAction {
  8.    JTextField$NotifyAction() {
  9.       super("notify-field-accept");
  10.    }
  11.  
  12.    public void actionPerformed(ActionEvent e) {
  13.       JTextComponent target = ((TextAction)this).getFocusedComponent();
  14.       if (target instanceof JTextField) {
  15.          JTextField field = (JTextField)target;
  16.          field.postActionEvent();
  17.       }
  18.  
  19.    }
  20. }
  21.